import React, { Component } from 'react'
import echarts from 'echarts/lib/echarts';
export default class Histogram extends Component {
    componentDidMount() {
        var option = {
            xAxis: {
                type: 'value',
                axisLine: {//这是y轴文字颜色
                    lineStyle: {
                        color: "#fff",
                    }
                },
            },
            yAxis: {
                axisLine: {//这是y轴文字颜色
                    lineStyle: {
                        color: "#fff",
                    }
                },
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            title: {
                text: "医院",
                x: "center",
                textStyle: {
                    color: "#fff"
                }
            },
            series: [{
                data: [120, 200, 150, 80, 70, 110, 130],
                type: 'bar',
                showBackground: false,
                backgroundStyle: {
                    color: 'rgba(220, 220, 220, 0.8)'
                }
            }]
        };
        echarts.init(document.getElementById("histogram")).setOption(option, true);

    }
    render() {
        return (
            <div id="histogram">

            </div>
        )
    }
}
